{include file=buyer.header.html}
<script type="text/javascript">
var xingxing={
	d:['非常不满意','不满意','比较满意','满意','非常满意'],
	go:function(o){
		var i=$(o);
		var div=$(o).parent();
		var input=div.siblings('input');
		var p=div.siblings('p');
		var index=0;
		div.children().each(function(j){
			index=div.children().index(i);
			if(j>index){
				$(this).removeClass('active');
			}else{
				$(this).addClass('active');
			}
		});
		input.val(index+1);
		p.html(xingxing.d[index]);
	}
};
jQuery(function(){
  $('#evaluate_form').bind('submit',function(){
    var g=true;
    jQuery.each($('.evaluateR-ta'),function(i){
      if($(this).val() == ''){
        g=false;
        wl.sConfirm({'info':'亲，求留言，求评价~','cancel':true});
        return false;
      }
    });
    return g;
  });

});
</script>
<!-- 内容 -->
<div class="content">
  <!-- 当前位置 -->
  {include file=path.html}
  <dl class="buyer-evaluate">
    <dt style="">
      <table width="100%" style="color:#999">
        <tr>
          <td width="100">&nbsp;</td>
          <td colspan="5"><img src="{res file = images/member/buyer-evaluation.jpg}" alt="" /></td>
        </tr>
        <tr>
          <td width="100">&nbsp;</td>
          <td width="220">{$order.add_time|date:complete}</td>
          <td width="220">{$order.pay_time|date:complete}</td>
          <td width="220">{$order.ship_time|date:complete}</td>
          <td width="220">{$order.finished_time|date:complete}</td>
          <td width="220">&nbsp;</td>
        </tr>
      </table>
    </dt>
    <dd>
      <form action="" method="post" id="evaluate_form">
        <div class="bedwrap">
          <div class="bedt">
            <h3>商品评价</h3>
          </div>
          <!--{foreach from=$goods_list item=goods}-->
          <table width="100%" class="bedtable">
            <tr>
              <td width="170" valign="top"><div class="goods-show-img"> <img src="{$goods.goods_image}" alt="" height="100"></div></td>
              <td width="190" valign="top"><p class="pa"><a class="linkbtn" href="{url app=goods&id=$goods.goods_id}">{$goods.goods_name|escape}</a></p></td>
              <td width="180"  valign="top" align="center"><div class="xingxing f-cb"> <i class="active" onmouseover="xingxing.go(this)"></i> <i class="active" onmouseover="xingxing.go(this)"></i> <i class="active" onmouseover="xingxing.go(this)"></i> <i class="active" onmouseover="xingxing.go(this)"></i> <i class="active" onmouseover="xingxing.go(this)"></i> </div>
                <p class="xinginfo">非常满意</p>
                <input type="hidden" name="evaluations[{$goods.rec_id}][evaluation]" value="5" />
                <input type="hidden" name="evaluations[{$goods.rec_id}][quantity]" value="{$goods.quantity}" /></td>
              <td valign="top" align="right" class="evaluateR"><ul>
                  <li>
                    <div class="valid-d">
                      <input type="hidden" name="evaluations[{$goods.rec_id}][goods_id]" value="{$goods.goods_id}" />
                      <textarea name="evaluations[{$goods.rec_id}][comment]" class="evaluateR-ta" onfocus="wl.focusInput(this)" onblur="wl.blurInput(this)"></textarea>
                      <label for="evaluateR">商品是否给力？其他买家需要您的建议哦！</label>
                    </div>
                  </li>
                </ul>
              </td>
            </tr>
          </table>
          <!--{/foreach}-->
          <div class="bedt pt30">
            <h3>卖家服务评价</h3>
          </div>
          <table width="100%" class="bedtable2">
            <tr>
              <td width="130"><div class="bedlevel">选择评比等级</div></td>
              <td width="80"><input type="radio" checked="checked" name="bedlevel" value="3" />
                好评 </td>
              <td width="80"><input type="radio" name="bedlevel" value="2" />
                中评 </td>
              <td><input type="radio" name="bedlevel" value="1" />
                差评 </td>
            </tr>
          </table>
        </div>
        <div class="bedsub">
          <input type="submit" value="发表评论" class="subbtnhsb" id="evaluate_submit" />
        </div>
      </form>
    </dd>
  </dl>
</div>
<!-- 页脚 -->
{include file=footer.html}